<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMessageTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('message', function (Blueprint $table) {
            $table->string('uid')->comment('用户id');
            $table->char('uname',20)->comment('用户姓名');
            $table->text('mood')->comment('用户心情');
            $table->text('idea')->comment('用户想法');
            $table->string('mpic',100)->default('/uploads/avatar/default.jpeg')->comment('用户分享图片');
            $table->string('regtime')->comment('留言创建时间');
       });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('message');

    }
}
